<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">

    <title>H+ 后台主题UI框架 - FooTable</title>
    <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">

    <link href="/after/css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
    <link href="/after/css/font-awesome.min.css?v=4.3.0" rel="stylesheet">

    <link href="/after/css/animate.min.css" rel="stylesheet">
    <link href="/after/css/style.min.css?v=3.0.0" rel="stylesheet">
    <link href="/after/js/laypage/skin/laypage.css" rel="stylesheet">

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-7">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>事故记录 <small>简单的记录情况</small></h5>

                    <div class="ibox-content">
                        <form id="accident" name="accident" class="form-horizontal">

                            <div class="form-group">
                                <label class="col-sm-2 control-label">订单号</label>

                                <div class="col-sm-10">
                                    <input type="text" name="orderList" id="orderList" class="form-control">
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">事故状况</label>
                                <div class="col-sm-10">
                                    <textarea name="reason" id="reason" class="form-control"></textarea>
                                    <span class="help-block m-b-none">更详细的信息能帮助您获得更快的解决</span>
                                </div>
                            </div>

                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-2">
                                    <button class="btn btn-primary" onclick="subBtn()">保存内容</button>
                                    <button class="btn btn-white" id="cancelBtn">取消</button>
                                </div>
                            </div>
                        </form>
                    </div>

                </div>
            </div>
        </div>
    </div>
</div>
<!-- 全局js -->
<script src="/after/js/jquery-2.1.1.min.js"></script>
<script src="/after/js/bootstrap.min.js?v=3.4.0"></script>
<script src="/after/js/laypage/laypage.js"></script>
<script src="/after/js/vue/vue.min.js"></script>
<script>

    var subBtn = function(){
        $.ajax({
            type:"POST",
            dataType:"json",
            url:"/returnOrder/addAccident.do",
            data:{
                orderList:$("#orderList").val(),
                reason:$("#reason").val()
            },success:function(msg){
                alert(1);
            },error:function(){
                alert(2);
            }
        })
    }

//    取消，关闭子窗口
    $("#cancelBtn").on('click',function(){
        var index = parent.layer.getFrameIndex(window.name);
        parent.layer.close(index);
    });

</script>
</body>

</html>